{extend name="base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__ADMIN__/js/mmgrid/mmGrid.css?v={$v}" />
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
{/block}
{block name="js"}
<script src="__ADMIN__/js/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
<script src="__ADMIN__/mobilebtns/mobilebtns.js?v={$v}" type="text/javascript"></script>
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
{/block}
{block name="main"}
<div id='alertTips' class='alert alert-success alert-tips fade in'>
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
  <ul class='body'>
    <li>该功能主要用于设置移动/微信端顶部按钮图标及其链接地址。若“所属插件”栏有值的记录请谨慎操作，以免造成插件新增或者删除失败。</li>
  </ul>
</div>
<form autocomplete="off">
<div class="wst-toolbar">
    <select id="btnSrc1"  class="query">
      <option value="-1">请选择按钮位置</option>
      <option value="0">手机版</option>
      <option value="1">微信版</option>
      <option value="2">小程序</option>
      <option value="3">APP</option>
    </select>
  <input type="text" name="btnName" placeholder="按钮名称" id="btnName1" class="query">
  <button type="button"  class='btn btn-primary btn-mright' onclick="javascript:loadGrid()"><i class="fa fa-search"></i>查询</button>
  {if WSTGrant('ANGL_01')}
   <button type='button' class="btn btn-success f-right  btn-fixtop" onclick="javascript:toEdit(0)"><i class='fa fa-plus'></i>新增</button>
   {/if}
   <div style="clear:both"></div>
</div>
</form>
<div class='wst-grid'>
<div id="mmg" class="mmg"></div>
<div id="pg" style="text-align: right;"></div>
</div>

<div id='mbtnBox' style='display:none'>
    <form id='mbtnForm' method="post" autocomplete="off">
    <table class='wst-form wst-box-top'>
       <tr>
          <th width='150'>按钮名称<font color='red'>*</font>：</th>
          <td><input type='text' id='btnName' name="btnName"  class='ipt' maxLength='20'/></td>
       </tr>
       <tr>
          <th width='150'>按钮Url<font color='red'>*</font>：</th>
          <td><input type='text' id='btnUrl' name="btnUrl"  class='ipt' /></td>
       </tr>
       <tr>
          <th>图标：</th>
          <td>
            <div id='adFilePicker'>上传图标</div><span id='uploadMsg'></span>
            <input type='hidden' id='btnImg' name="btnImg" class="ipt" />
          </td>
       </tr>
       <tr>
          <th>预览图：</th>
          <td><div style="max-height:70px;max-width:70px;" id="preview"></div></td>
       </tr>
       <tr id="mbBtnType">
          <th>按钮类别：</th>
          <td>
            <select id="btnSrc"  class="ipt">
              <option value="0">手机版</option>
              <option value="1">微信版</option>
              <option value="2">小程序</option>
              <option value="3">APP</option>
            </select>
          </td>
       </tr>
       <tr>
          <th>所属插件：</th>
          <td>
            <input type="text" id="addonsName" class="ipt" />
          </td>
       </tr>
       <tr>
          <th>排序号：</th>
          <td>
            <input type="text" id="btnSort" class="ipt" />
          </td>
       </tr>
    </table>
    </form>
  </div>
<script>
  $(function(){initGrid()});
</script>
{/block}
